import React from 'react';
import { Button, Result } from 'antd';
import { useHistory } from 'react-router-dom';

const App: React.FC = () => {
  const history = useHistory();

  // 返回主页
  const backHome = () => {
    history.replace('/');
  };
  return (
    <div className='w-full pt-32'>
      <Result
        status='404'
        title='404'
        subTitle='抱歉，你访问的页面似乎不存在～'
        extra={
          <Button type='primary' onClick={backHome}>
            返回首页
          </Button>
        }
      />
    </div>
  );
};

export default App;
